home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak 50
/
Volume 50 - JOGO DISK .iso
/
Games
/
moonstonemadness.swf
/
scripts
/
__Packages
/
Library
/
State.as
< prev
next >
Wrap
Text File
|
2007-09-27
|
2KB
|
82 lines
class Library.State
{
function State(__mcRef)
{
this.mcRef = __mcRef;
this.bStateLocked = false;
this.bPaused = false;
}
function doEnterFrame()
{
this["do" + this.sState]();
}
function doPause()
{
this.bPaused = true;
this.mcRef.mcState.stop();
}
function doResume()
{
this.bPaused = false;
this.mcRef.mcState.play();
}
function setState(__sState)
{
if(!this.bStateLocked)
{
this.doForcedSetState(__sState);
}
}
function doForcedSetState(__sState)
{
if(this.sState != __sState)
{
this.doUnLoadStateAction(this.sState);
this.sState = __sState;
this.mcRef.gotoAndStop(this.sState);
this.nStateTotalFrame = this.mcRef.mcState._totalframes;
this.doLoadStateAction(this.sState);
}
}
function get Paused()
{
return this.bPaused;
}
function get CurrentState()
{
return this.sState;
}
function doLoadStateAction()
{
}
function doUnLoadStateAction()
{
}
function doLockState()
{
this.bStateLocked = true;
}
function doUnlockState()
{
this.bStateLocked = false;
}
function isStateComplete()
{
var _loc2_ = false;
if(this.mcRef.mcState._currentframe == this.nStateTotalFrame)
{
_loc2_ = true;
}
return _loc2_;
}
function isStateStarting()
{
var _loc2_ = false;
if(this.mcRef.mcState._currentframe == 1)
{
_loc2_ = true;
}
return _loc2_;
}
}